package com.utils;


import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

/**
 *  所有请求的参数转换
 */
public class RequestUtils {
    public static Map<String,Object> getParameterMap(HttpServletRequest request){
        Map<String,Object> map = new HashMap<>();
        Enumeration enu=request.getParameterNames();
        while(enu.hasMoreElements()){
            String key=(String)enu.nextElement();
            Object value = request.getParameter(key);
            map.put(key,value);
        }
        return map;
    }
}
